Skip to content

Fix well index decoding in Imager.capture for Well objects - #1226

Merged
rickwierenga merged 1 commit into
PyLabRobot:mainfrom
hinderling:fix-imager-well-index
Aug 30, 2026
Merged

Fix well index decoding in Imager.capture for Well objects#1226
rickwierenga merged 1 commit into
PyLabRobot:mainfrom
hinderling:fix-imager-well-index

Conversation

@hinderling

Copy link
Copy Markdown
Contributor

Plate items are ordered column-major (A1, B1, ..., H1, A2, ...), but capture() decoded a well's index with divmod(idx, num_items_x), which mis-addresses wells: capture(well=plate.get_well("B2")) images A10 on a 96-well plate, while the equivalent capture(well=(1, 1)) images B2.

Fix: Use the get_child_row/get_child_column accessors instead of hand-decoding the index, so the resolution no longer depends on item ordering at all. Adds a regression test.

Plate items are ordered column-major (A1, B1, ..., H1, A2, ...), but capture()
decoded a Well's index with divmod(idx, num_items_x), which mis-addresses wells
on non-square plates: capture(well=plate.get_well("B2")) images A10 on a
96-well plate, while the equivalent capture(well=(1, 1)) images B2.

Resolve the well with the get_child_row/get_child_column accessors instead of
hand-decoding the index, so resolution does not depend on item ordering.
Adds a regression test.
@hinderling
hinderling force-pushed the fix-imager-well-index branch from d141f79 to e1971dd Compare August 28, 2026 15:08
@rickwierenga
rickwierenga merged commit 1870256 into PyLabRobot:main Aug 30, 2026
21 checks passed
@rickwierenga

Copy link
Copy Markdown
Member

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants